﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace AsycServer
{
    partial class Program
    {
        /// <summary>
        /// 断开连接的回调
        /// </summary>
        /// <param name="c"></param>
        public void OnDisconnect(Client c)
        {
            Console.WriteLine("{0}[{1}, {2}] disconnected!", c.ID, c.tcpAdress, c.udpAdress);
            clientList.Remove(c);
            if (userList.ContainsKey(c))
            {
                userList.Remove(c);
            }
        }
    }
}